package com.wenlin.userservice.controller;

import com.wenlin.userservice.response.Message;
import com.wenlin.userservice.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/***
 *  Created with IntelliJ IDEA.
 *  User:  wenlin
 *  Date:  2017/12/1
 *  Time:  14:18
 *  Description:
 **/
@RestController
@RequestMapping("/user/flag")
public class FlagController {
    @Autowired
    private TestService testService;

    @GetMapping()
    public Message get(){
        return  testService.getFlag();
    }
    @PostMapping
    public Message update(Integer flag){
        return  testService.update(flag);
    }
}
